abstraction
Class CartesianProduct

java.lang.Object
  extended by abstraction.CartesianProduct

public class CartesianProduct
extends java.lang.Object

This class executes carthisian product. To execute a product you have to call executeProduct methods


Field Summary
(package private)  long estimateTime
           
 
Constructor Summary
CartesianProduct()
           
 
Method Summary
static Service executeProduct(AvailableServices comm)
          This method build a Carthisian Product among Services present inside a Community
private static java.lang.String productFinalStates(java.util.Set<State> l1, java.util.Set<State> l2)
          This method executes a Cartesian product among final states
private static java.lang.String productService(Service s1, Service s2)
          This method builds a String with final states and transition of two Service.
private static java.lang.String productTransition(java.util.Set<TransitionFunction> l1, java.lang.String l1Name, java.util.Set<TransitionFunction> l2, java.lang.String l2Name)
          This method execute a carthisian product among transition functions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

estimateTime

long estimateTime
Constructor Detail

CartesianProduct

public CartesianProduct()
Method Detail

executeProduct

public static Service executeProduct(AvailableServices comm)
This method build a Carthisian Product among Services present inside a Community

Parameters:
comm - where execute product
Returns:
a carthisian product like Service. Service Class wants a String with content's available service. This string will be provide from productService method

productService

private static java.lang.String productService(Service s1,
                                               Service s2)
This method builds a String with final states and transition of two Service.

Parameters:
s1 - service
s2 - service
Returns:
a service like a String

productTransition

private static java.lang.String productTransition(java.util.Set<TransitionFunction> l1,
                                                  java.lang.String l1Name,
                                                  java.util.Set<TransitionFunction> l2,
                                                  java.lang.String l2Name)
This method execute a carthisian product among transition functions

Parameters:
l1 - Set of transition functions of one Service of community
l2 - Set of transition functions of another Service of community
Returns:
a string with product of all transition functions

productFinalStates

private static java.lang.String productFinalStates(java.util.Set<State> l1,
                                                   java.util.Set<State> l2)
This method executes a Cartesian product among final states

Parameters:
l1 - Set of final states of one Service of community
l2 - Set of final states of another Service of community
Returns:
a string with product of all transition functions